package model.inventory;
// Generated Oct 27, 2012 8:43:23 AM by Hibernate Tools 3.2.1.GA


import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * MstDept generated by hbm2java
 */
@Entity
@Table(name="mst_dept", schema="inventory")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Dept  implements java.io.Serializable {
    private int id;
    private String kode;
    private String nama;
    private Integer induk;
    private Integer tinkat;    
            
    public Dept() {
    }
	
    public Dept(int id) {
        this.id = id;
    }
    
    public Dept(int id, String kode, String nama, Integer induk, Integer tinkat) {
       this.id = id;
       this.kode = kode;
       this.nama = nama;
       this.induk = induk;
       this.tinkat = tinkat;
    }
   
    @Id 
    @SequenceGenerator(name="dept_seq", sequenceName="inventory.mst_dept_id_seq", allocationSize=1)
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="dept_seq")
    @Column(name="id", unique=true, nullable=false)
    public int getId() {
        return this.id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    @Column(name="kode", length=20)
    public String getKode() {
        return this.kode;
    }
    
    public void setKode(String kode) {
        this.kode = kode;
    }
    
    @Column(name="nama", length=100)
    public String getNama() {
        return this.nama;
    }
    
    public void setNama(String nama) {
        this.nama = nama;
    }
    
    @Column(name="induk")
    public Integer getInduk() {
        return this.induk;
    }
    
    public void setInduk(Integer induk) {
        this.induk = induk;
    }
    
    @Column(name="tinkat")
    public Integer getTinkat() {
        return this.tinkat;
    }
    
    public void setTinkat(Integer tinkat) {
        this.tinkat = tinkat;
    }

    @Override
    public String toString() {
        return this.nama;
    }

   

    
}


